package com.heima.admin.controller.v1;

import com.heima.admin.service.AdUserService;
import com.heima.model.admin.dtos.AuthDto;
import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * <p>
 * 管理员用户信息表 前端控制器
 * </p>
 *
 * @author fly
 */
@Slf4j
@RestController
@RequestMapping("/api/v1/auth")
public class AdUserController {

    @Autowired
    private AdUserService adUserService;

    @PostMapping("/list")
    public PageResponseResult findList(@RequestBody AuthDto authDto){
   return adUserService.findList(authDto);
    }
    @PostMapping("/authFail")
    public ResponseResult  authFail(@RequestBody AuthDto authDto){
   return adUserService. authFail(authDto);
    }
    @PostMapping("/authPass")
    public ResponseResult  authPass(@RequestBody AuthDto authDto){
   return adUserService. authPass(authDto);
    }
}
